#ifndef PLACE_CATEGORY_VIEW_H
#define PLACE_CATEGORY_VIEW_H

#include <QDialog>

#include "view_base.h"
#include "result_processor.h"
#include "data_types.h"

namespace Ui {
    class PlaceCategoryView;
}

class QListWidgetItem;
class PlaceSubCategoryView;

class PlaceCategoryView : public ViewBase, ResultProcessor
{
    Q_OBJECT

public:
    explicit PlaceCategoryView(QWidget *parent = 0);
    virtual ~PlaceCategoryView();

    virtual void IssueRequest();

  protected:
    virtual int ProcessResult(RequestMethod &r, QDomElement &e);

public slots:
    void showPlaceSubCategory(QListWidgetItem *item);

private:
    int parse_result(QDomElement &e);

private:
    Ui::PlaceCategoryView *ui;
    QVector<cate> placeCategories;
    PlaceSubCategoryView *placeSubCategoryView_;
};

#endif // PLACE_CATEGORY_VIEW_H
